/*********************************************************************
Author: Roberto Bruttomesso <roberto.bruttomesso@unisi.ch>

MiniWrapper -- Copyright (C) 2008, Roberto Bruttomesso

MiniWrapper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

MiniWrapper is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with MiniWrapper. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/

%{

#include <cstdio>
#include <cstdlib>
#include "parser.tab.hh"

#define BUFFER_LENGTH 1024

char   buffer[ BUFFER_LENGTH ];
char * pbuffer;
  
%}

%option noyywrap
%option yylineno
%option nounput

%%

[ \t\n]                  { }
"#".*                    { } 
"$"                      { return TK_END_CLAUSE; }
"~"                      { return TK_NEGATION; }
[_a-zA-Z0-9\.\']+        { yylval.str = strdup( yytext ); return TK_STR; }

.                        { printf( "Syntax error at line %d near %s\n", yylineno, yytext ); exit( 1 ); }

%%
